package com.kf.service.impl;

import com.kf.mapper.UserMapper;
import com.kf.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author ChrisGod
 * User用户表
 * 2019/12/2 10:10
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    /**
     * 根据用户id,删除该用户
     *
     * @param userId
     * @return
     */
    @Override
    public boolean deleteUserById(Integer userId) {
        int num = userMapper.deleteById(userId);
        if (num > 0) {
            return true;
        } else {

            return false;
        }
    }
}
